package com.tungse.copyExample;

import lombok.ToString;

@ToString
public class Address {
    private String city;

    public Address(String city) {
        this.city = city;
    }

    public String getCity() {
        return city;
    }

    public void setCity(String city) {
        this.city = city;
    }

    // 实现深拷贝的方法
    public Address deepCopy() {
        return new Address(this.city);
    }
}
